import NProgress from 'nprogress'
import permission from './permission'

export const createRouterGuards = router => {
  router.beforeEach(permission)

  router.afterEach(() => {
    NProgress.done()
  })
}
